import request from "../utils/request";

const USER_PAGE_API = (pageNum, pageSize, userQueryDTO) => {
  const params = { pageNum, pageSize, ...userQueryDTO };
  return request({ url: "/api/user/page", method: "GET", params });
};
const GET_BY_ID_API = (id) => request({ url: `/api/user/getById/${id}`, method: "GET" });

const EDIT_API = (data) => request({ url: "/api/user/edit", method: "PUT", data });

const DEL_API = (ids) => request({ url: `/api/user/del/${ids}`, method: "DELETE" });

const ADD_API = (data) => request({ url: "/api/user/add", method: "POST", data });

export { ADD_API, DEL_API, EDIT_API, GET_BY_ID_API, USER_PAGE_API };
